package it.gameplanet.client.widgets;

import it.gameplanet.client.GamePlanetContext;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.VerticalPanel;

public class GamePlanetPanel extends Composite {

	public GamePlanetPanel() {
		VerticalPanel container = new VerticalPanel();
		
		Hyperlink chiSiamo = new Hyperlink("Chi siamo", "chisiamo");
		container.add(chiSiamo);
		chiSiamo.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				GamePlanetContext.setContentPanel(new HTML("<h1>Game Planet</h1><p>Descrizione del negozio</p>"));
			}
			
		});
		
		Hyperlink doveSiamo = new Hyperlink("Dove siamo", "dovesiamo");
		container.add(doveSiamo);
		doveSiamo.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				GamePlanetContext.setContentPanel(new GamePlanetMapWidget());
			}
			
		});
		
		initWidget(container);
	}
}
